<% content_for :title do %>用户注册<% end %>

<%= form_for(resource, as: resource_name, url: registration_path(resource_name),:html=>{:class=>"form-horizontal"}) do |f| %>

  <%= devise_error_messages! %>


<div class="form-group">
  <%= f.label "姓 名",:class=>"col-sm-2 control-label" %>
  <div class="col-sm-4">
  <%= f.text_field :name, autofocus: true,:class=>"form-control",:placeholder=>"Enter name"%>
  </div>
</div>

<div class="form-group">
  <%= f.label "邮 箱",:class=>"col-sm-2 control-label" %>
  <div class="col-sm-4">
  <%= f.email_field :email,:class=>"form-control",:placeholder=>"Enter email"%>
  </div>
</div>
<div class="form-group">
  <%= f.label "密 码",:class=>"col-sm-2 control-label" %>
  <div class="col-sm-4">
  <%= f.password_field :password,:class=>"form-control",autocomplete: "off" %>
  </div>
</div>

<div class="form-group">
  <%= f.label "确认密码",:class=>"col-sm-2 control-label" %>
  <div class="col-sm-4">
   <%= f.password_field :password_confirmation,:class=>"form-control", autocomplete: "off" %>
  </div>
</div>

<div class="form-group">
  <%= f.label "联系电话",:class=>"col-sm-2 control-label" %>
  <div class="col-sm-4">
  <%= f.text_field :phone, autofocus: true,:class=>"form-control",:placeholder=>"Enter phone"%>
  </div>
</div>

<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-default btn-primary">确定注册</button>
      <%= link_to "返回登录",new_user_session_path%>
    </div>
</div>
<% end %>
